home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / text / hints / volume_01 / issue_12 < prev   
Text File  |  1995-02-16  |  18KB  |  466 lines

  1. •   PipeDream − For those who have not used View etc and who have
  2. therefore not had to fight printer drivers, the following may be useful:
  3. 1.12
  4. The printer driver is loaded on initialisation and when <Alt><P><D> is
  5. used, but NOT when a document is printed, so any changes made to a
  6. printer driver are not acted upon until either of these events. It’s
  7. obvious really, but if you haven’t registered the fact, it could cause a
  8. lot of confusion.
  9. 1.12
  10. For those who wish to use bold throughout a document, (e.g. for
  11. producing something on a dot-matrix printer that will go through a Fax
  12. machine) it would seem an obvious solution to put markers at the
  13. beginning and end of the document and make it all bold highlight.
  14. However, this is not a good idea because your printer will have to cope
  15. with double printing each word, one word at a time! Instead, change the
  16. printer driver so that the bold highlight is NOT cancelled at the end of
  17. a line. i.e. change the Y to an N and either send the necessary ESC
  18. sequence in the PON line or put a highlight 2 at the very start of your
  19. text.
  20. 1.12
  21. •   Transferring character definitions − If you have files produced by
  22. the CHARDES program from the Master Welcome disc (mentioned last month,
  23. page 34) here is a little BASIC program to run the files on the
  24. Archimedes:
  25. 1.12
  26.  10 REM >ThinChar
  27. 1.12
  28.  20 CLS : INPUT “FileName ”;A$
  29. 1.12
  30.  30 OSCLI (“LOAD ”+A$+“ 12800”)
  31. 1.12
  32.  40 FOR I=127 TO 32 STEP -1
  33. 1.12
  34.  50 VDU23,I
  35. 1.12
  36.  60 VDU(?(&12844+I-32))
  37. 1.12
  38.  70 VDU(?(&128A4+I-32))
  39. 1.12
  40.  80 VDU(?(&12904+I-32))
  41. 1.12
  42.  90 VDU(?(&12964+I-32))
  43. 1.12
  44. 100 VDU(?(&129C4+I-32))
  45. 1.12
  46. 110 VDU(?(&12A24+I-32))
  47. 1.12
  48. 120 VDU(?(&12A84+I-32))
  49. 1.12
  50. 130 VDU(?(&12AE4+I-32))
  51. 1.12
  52. 140 NEXT
  53. 1.12
  54. •   Quazer (again). The fix for Quazer 1.42 is ?&3D090=N¼ of lives,
  55. ?&3D98F=&F2, *SAVE Quazcode 9000 +365AC, *settype Quazcode FF8. •  
  56. Printing in binary − PRINT ~number% prints number% in hexadecimal but
  57. there isn’t an equivalent for printing in binary. However, there are SYS
  58. commands that will do it for you. The following program illustrates the
  59. use of SYS &E0 which converts a number to a four byte binary number
  60. string (SYS’s &DF, DE and DD convert to 3, 2 and 1 byte binary numbers).
  61. 1.12
  62. The only other point of interest in the program is the way that the
  63. leading zeros are stripped off by lines 190, 200 (which can be omitted,
  64. of course, if you want the leading zeros!). The INSTR command finds the
  65. position of the first “1” starting from the left hand end of the string,
  66. take off one to give the number of zeros to be removed. The LEFT$
  67. command at line 200 turns those zero characters into the character set
  68. by pad$. (This illustrates the fact that you can use string functions on
  69. the left hand side of an assignment.) If pad$ is a space character, the
  70. binary numbers produced will all be the same length and so will be right
  71. justified but if you want the strings left justified, you can set pad$
  72. to CHR$0. (An alternative for left justification would be to use
  73. numb$=RIGHT$(numb$,32-n%).)
  74. 1.12
  75.  10 REM > BinPrint
  76. 1.12
  77.  20
  78. 1.12
  79.  30 pad$=CHR$0 :REM left justif’n
  80. 1.12
  81.  40 pad$=“ ” : REM right justif’n
  82. 1.12
  83.  50 OS_ConvertBinary4=&E0
  84. 1.12
  85.  60
  86. 1.12
  87.  70 REPEAT
  88. 1.12
  89.  80   INPUT “Number? ”number$
  90. 1.12
  91.  90   number%=EVAL(number$)
  92. 1.12
  93. 100   A$=FNbinconvert(number%)
  94. 1.12
  95. 110   PRINT A$
  96. 1.12
  97. 120 UNTIL0
  98. 1.12
  99. 130
  100. 1.12
  101. 140 DEF FNbinconvert(numb%)
  102. 1.12
  103. 150 LOCAL numb$,n%
  104. 1.12
  105. 160 
  106. 1.12
  107. 170 SYS OS_ConvertBinary4,numb%,
  108. 1.12
  109. 32,numb$ TO numb$
  110. 1.12
  111. 180
  112. 1.12
  113. 190 n%=INSTR(numb$,“1”)-1
  114. 1.12
  115. 200 LEFT$(numb$,n%)=STRING$(n%
  116. 1.12
  117. ,pad$)
  118. 1.12
  119. 210 =numb$ 
  120. 1.12
  121. •   Hard Disc Head Parking − Don’t forget that if the RFS is selected,
  122. it will accept the *BYE command but it will not park the heads on the
  123. drive. You have to be in ADFS.
  124. 1.12
  125. •   Screenload/save − It is interesting to compare the time taken to
  126. save and load screens using *screensave and *screenload with the time
  127. taken to define the whole screen as a sprite and save it using *Ssave or
  128. load it with *Sload. In all modes there is considerable saving e.g.
  129. 1.12
  130.    Mode1   Mode12   Mode 15
  131. 1.12
  132.   *Screensave(load)   7(4)   25(18)   52(38)
  133. 1.12
  134.   *Ssave(load)   1(<1)   3(3)   7(6)
  135. 1.12
  136. •   Libraries and *mountÉ If you *mount a disc, the library from the
  137. previous disc remains in memory. For those with a single drive, this may
  138. seem a nuisance but the reason the library is not changed is that you
  139. can have a library on one drive and shove discs in and out of the other
  140. drive without losing the library − particularly important with hard
  141. discs. Obviously you could reselect the library with *library $.Library
  142. but it is much easier to use *bye. That way, you don’t even have to use
  143. *mount.
  144. 1.12
  145. •   Reliable RS423 transfer from BBC’s. This is mostly just reiterating
  146. what has gone before, but to transfer reliably from BBC to Archimedes at
  147. 9,600 baud you need to [1] use the 1.24 serial patch (on Archive program
  148. disc 7) [2] Set *Configure DATA 5 (i.e. 8 data bits and 1 stop bit which
  149. is the default on the BBC) and [3] connect the BBC’s RTS output to the
  150. Archimedes’ DSR input (pin 6) instead of the CTS input (pin 8) and link
  151. pins 1, 4 and 8 together.
  152. 1.12
  153. •   View A3.0 Further to the patches given in July issue (Vol. 1.10 page
  154. 6) Richard House reckons that instead of using &FF’s in the various
  155. locations you should use &00’s. (If someone has a working version of
  156. A3.0, please send it in so that we can add it to our collection of
  157. working patches!)
  158. 1.12
  159. •   Viewstore 1.1 − Following on from the July Hints & Tips, not that
  160. not only should &ABE2, 3 and 4 be set to &EA, but also, the LDA #&82,
  161. JSR OSBYTE (&A9, &82, &20, &F4, &FF) routines need to be altered as with
  162. View A3.0. These occur at locations &A256 − A25A, &AA22 − AA26 and &AB98
  163. − AB9C. The code required in each of these locations is &A2, &00, &A0,
  164. &00, &EA. (LDX #&00, LDY #&00, NOP). (If you can’t cope with these
  165. technicalities, send us a disc with Viewstore 1.1 on it and we’ll modify
  166. it for you.)
  167. 1.12
  168. •   Correct Nesting? To check that the nesting of loops, IF’s and CASE’s
  169. is correct within a program, use LISTO2 and LIST the program. If at the
  170. end of the program, the final line has two or more spaces after the line
  171. number, you’ve got an incorrect nesting somewhere. To check through,
  172. there should be no spaces between line numbers and DEFPROC’s, DEFFN’s or
  173. ENDPROC’s.
  174. 1.12
  175. •   Marconi Trackerball. Archimedes’ mouse’s tail can apparently be
  176. removed, so says Mr T A Doncaster, and plugged into an identical
  177. connector within the Marconi RB2/PC-1 tracker ball and all works without
  178. any further fiddling about. Watch that the supply polarity is correct
  179. though.
  180. 1.12
  181. •   Readable zeros. In InterSheet in particular, I find the slashed-
  182. zeros misleading − they can easily be mistaken for eights. If you re-
  183. program the zero character using a VDU23 command you can avoid the
  184. confusion. It does increase the possibility of confusion with a capital-
  185. O but that is far less important in spreadsheet work than confusion with
  186. 8. So, I store the following program in the RAM on the RFS and call it
  187. up with *IS<return>:
  188. 1.12
  189. 10 REM >RFS:IS
  190. 1.12
  191. 20 VDU23,48,60,102,102,102,102,
  192. 1.12
  193. 102,60,0
  194. 1.12
  195. 30 CHAIN “RFS:ISHEET”
  196. 1.12
  197. No doubt you could modify this program if you wanted to use the same re-
  198. programmed zero character with other spreadsheet software.
  199. 1.12
  200. •   Computer salutions. R.E.Boldero, in the July edition, asked for a
  201. way of getting his computer to greet him each time he switched on. The
  202. next hint shows a partial solution.
  203. 1.12
  204. •   RFS Boot file − If you use a ROM podule with battery backup, you can
  205. create a boot file that runs in the RFS and sets up all sorts of
  206. goodies. I used to have a BASIC program called !BOOT which set up all
  207. sorts of things on power-up or <ctrl-break> but if you are developing a
  208. BASIC program, get stuck and press <ctrl-break>, you lose the program
  209. because it is replaced by the boot program!!!!! After Adrian had fallen
  210. into this trap a few times when using my computer, he developed the
  211. following rather ingenious (not to say devious) EXECable boot program.
  212. (*Configure Filesystem RFS, *Configure Boot and *OPT 4,3 in the RFS.)
  213. 1.12
  214. We have since added a facility for making Arthur talk to you a bit more
  215. politely, from an idea sent in by Chris Hayes.
  216. 1.12
  217. To create the boot file, I start with the following Wordwise Plus file
  218. which is then spooled as “RFS:!BOOT”.  (The line numbers are purely for
  219. discussion purposes.)
  220. 1.12
  221.  1 <gr>LL160<gr>PC “~”
  222. 1.12
  223.  2 VDU21
  224. 1.12
  225.  3 VDU6,11,32,32,32,32,32,32,21
  226. 1.12
  227.  4 VDU6,19,0,4,0,0,0,21
  228. 1.12
  229.  5 VDU6,19,1,0,0,0,0,21
  230. 1.12
  231.  6 VDU6,13,11,11,11,11,11,21
  232. 1.12
  233.  7 VDU6:COLOUR 6:VDU21
  234. 1.12
  235.  8 VDU6:PRINT“N o r w i c h   C o
  236. 1.12
  237.  m p u t e r   S e r v i c e s“
  238. 1.12
  239. :VDU21
  240. 1.12
  241.  9 VDU6:COLOUR 7:VDU21
  242. 1.12
  243.  
  244. 1.12
  245. 10 *SETCLI$PROMPT <13><10>Good
  246. 1.12
  247.  Morning! *
  248. 1.12
  249. 11 *IF SYS$TIME LEFT 2>11 THEN SET
  250. 1.12
  251.  CLI$PROMPT <13><10>Good Afternoon! *
  252. 1.12
  253. 12 *IF SYS$TIME LEFT 2>18 THEN SET
  254. 1.12
  255.  CLI$PROMPT <13><10>Good
  256. 1.12
  257.  Evening! *
  258. 1.12
  259.  
  260. 1.12
  261. 13 *KEY0 *MOUNT 0|M*FREE|M*CAT|M
  262. 1.12
  263. 14 *KEY1 etc...
  264. 1.12
  265. 20 *KEY12 *FORMAT 0 D|M
  266. 1.12
  267.  
  268. 1.12
  269. 21 *SET Run$Path ,ADFS:$.,RFS:$.
  270. 1.12
  271. ,%.
  272. 1.12
  273. 22 *SET Alias$> CAT
  274. 1.12
  275.  
  276. 1.12
  277. 23 *FX255,8
  278. 1.12
  279. 24 *ADFS
  280. 1.12
  281. 25 *BASIC<gr>OC6
  282. 1.12
  283. The LL160 command (1) ensures that the command lines are not split up
  284. and the PC command ensures that the pad characters are sent when
  285. spooling the file. (2) switches off the screen display, but since this
  286. actual command appears on the screen, (3) moves up and wipes it out
  287. again! (4) and (5) change foreground and background colours (6) moves
  288. the cursor back up the screen, before printing out a welcome message in
  289. a different colour, (7 & 8) and switching back to white (9). The IF
  290. SYS$TIME commands then sets up the Arthurian prompt (normally a star on
  291. its own) to be something a bit more timely. (This doesn’t automatically
  292. change the greeting as the time of day changes, it gives you the
  293. greeting that was appropriate last time you pressed <ctrl-break>.) The
  294. function keys are then programmed, the runpath is set up etc (21 − 24)
  295. (See Archive 1.7, page 8) before BASIC is invoked with an OC6 to re-
  296. enable the screen.
  297. 1.12
  298. (You could create it by making it a BASIC program that started...
  299. 1.12
  300. *SPOOL RFS:!BOOT
  301. 1.12
  302. PRINT“VDU21”
  303. 1.12
  304. and endedÉ
  305. 1.12
  306. PRINT“*BASIC”;CHR$(6);
  307. 1.12
  308. *SPOOL
  309. 1.12
  310. I haven’t tried this BASIC version, but I presume it would work.)
  311. 1.12
  312. •   Keyboard repeat speed. You may have noticed with First Word Plus or
  313. other wordprocessors that when pressing <return> on auto-repeat it
  314. cannot keep up and, when you take your finger off the key, it goes on
  315. spewing out returns until the keyboard buffer is empty. You can avoid
  316. this by reducing the auto-repeat speed with, say, *Configure repeat 15
  317. (instead of the default of 8) and then pressing <ctrl-break>. (It should
  318. really be called the auto repeat time as the number is the time in
  319. centi-seconds between repeats.) Instead of changing the configuration,
  320. you may prefer to could add a *FX12,15 command into the !BOOT file and
  321. then press <ctrl-break> after your WP session to restore the default
  322. repeat speed.
  323. 1.12
  324. •   Disappearing cursor in EDIT. Have you noticed that if you hold the
  325. cursor key down in the BASIC editor, the cursor disappears so that you
  326. can’t see where it is on the line? Try changing the auto repeat speed as
  327. mentioned in the hint above − doesn’t always work, but it seems to make
  328. it better if you have a faster speed (smaller number in the command).
  329. 1.12
  330. •   Auto indenting in EDIT. Some people like to put the indenting into
  331. the program itself to show the structure (as opposed to using LISTO3 to
  332. show the structure when you list it). If you are using the ARM BASIC
  333. editor, you can add the spaces automatically as you type in the program.
  334. What happens is that if you put a number of spaces at the beginning of
  335. one program line then, when you press <return>, the new line has the
  336. same number of leading spaces as the line before, so until you reach a
  337. REPEAT or UNTIL or FOR or NEXT etc, you just press <return> and type the
  338. next line without thinking about the indenting.
  339. 1.12
  340. •   Disappearing programs in EDIT!! On the BASIC editor, if you edit a
  341. line that occupies more than one screen line and make it shorter, it may
  342. leave a blank line on the screen (no problem − this disappears as soon
  343. as you move the cursor away from that line). If you then press <return>
  344. to create a new line, the new line goes in the gap left by the editing
  345. (still, apparently, no problem). However as soon as you try to use any
  346. of the move, delete, or copy functions, all the line numbers go wrong
  347. and cursor movement becomes rather unpredictable. Indeed, if you move
  348. down the program, you will find that when the line that was edited moves
  349. off the top of the screen, the scrolling continues and the program
  350. disappears into oblivion! (Reset and OLD will recover your program
  351. intact.)
  352. 1.12
  353. The solution is, if you get a line gap, either re-number (which happens
  354. automatically if the line numbers were already consecutive) or move down
  355. a line then back up again before pressing <return>.
  356. 1.12
  357. •   Pencil for Artisan. If you want to add a ‘pencil’ facility to
  358. Artisan, the joined-lines function can be made to provide this in the
  359. following way. (1) Using a copy (not the original!!) of the Artisan
  360. disc, enter the BASIC editor and load ART5. (2) Use Search and Edit to
  361. find DEFPROCKB. (3) Alter the procedure so that it looks like this:-
  362. 1.12
  363. DEFPROCKB
  364. 1.12
  365. LOCAL X%, Y%, B%
  366. 1.12
  367. IF J%=6 AND CLARE%=-1 THEN
  368. 1.12
  369. MOUSE X%,Y%,B% :ENDPROC
  370. 1.12
  371. ELSE
  372. 1.12
  373. REPEAT:MOUSE X%,Y%,B%:UNTIL B%<>BB%:ENDPROC
  374. 1.12
  375. ENDIF
  376. 1.12
  377. (4) Save this as ART5. (5) For completeness, use the Welcome utility,
  378. SEDIT, to change the joined-lines icon into a pencil icon. (6) Now, with
  379. the joined-lines function selected, holding down <select> draws a
  380. continuous line. On releasing <select>, the normal rubber band line
  381. appears, but it can be released by pressing <adjust> once. Pressing
  382. <adjust> again carries out the UNDO function.
  383. 1.12
  384. (While on the subject of modifying Artisan, note the short addition in
  385. Acorn User, April ’88 which adds an airbrush effect.)
  386. 1.12
  387. •   Star LC24-10. If you are having problems with getting a Star LC24-10
  388. to accept output from First Word Plus or Graphic Writer, check the EPROM
  389. chip in the printer next to the dip switches. If it has a label on it
  390. showing version 1.0, contact Star Micronics and they will supply a free
  391. up-grade.
  392. 1.12
  393. •   Moving menus. If you find that your menus keep moving about, drag
  394. the box down to the extreme bottom right corner of the screen until you
  395. can go no further. This makes them a little more secure − simple, but
  396. soothing!
  397. 1.12
  398. •   Programming for speed. Programs like EMR’s SoundSynth and Minerva’s
  399. Hoverbod and Missile Control are actually written in BASIC, with calls
  400. to ARM assembly language routines where extra speed is really necessary.
  401. 1.12
  402. If you thought professional quality programs demanded assembly language
  403. only, think again! Perhaps there is a program you had thought of
  404. writing, but did not feel could be written in BASIC; the speed of the
  405. Archimedes has changed all of that.
  406. 1.12
  407. Your strategy should be to write the whole program in BASIC first and
  408. then see which routines need replacing with assembly language in order
  409. to provide the right response times.
  410. 1.12
  411. Mike Ginns’ recent book from DABS Press, “Archimedes Assembly Language”,
  412. contains a large number of assembly language counterparts for BASIC
  413. statements (he calls them “templates”), and would be of great value if
  414. you want to try your hand at this sort of approach. Although the book
  415. has rather a large number of grammatical errors and is not quite as
  416. fully comprehensive as it claims to be, but is still a good buy at
  417. £14.95. (Ian Nicholls)
  418. 1.12
  419. First Word Plus Hints
  420. 1.12
  421. •   Using PC’s − If you have access to a PC and a PC version of First
  422. Word Plus, you may be interested to know that you can transfer files
  423. between the two using the Getfile and Putfile utilities of the PC
  424. Emulator. You can even transfer supplementary dictionaries the same way.
  425. 1.12
  426. •   Adding printer drivers − It may not be very obvious how you add the
  427. extra printer drivers that we’ve provided on the program discs, onto
  428. your First Word Plus disc. Suppose you want the Kaga Taxan driver. Put
  429. in the program disc and type
  430. 1.12
  431. *copy 1WP.cfg.Kaga_Taxan 1WP.cfg.* P
  432. 1.12
  433. then change discs and press <space> as prompted. (Or use dual drives if
  434. you have them.)
  435. 1.12
  436. •   Default printer driver − If you want to make, say the Juki driver,
  437. the default so that it comes up with that as the driver when you boot up
  438. the disc, use:
  439. 1.12
  440. *copy  $.1WP.cfg.Juki  $.Res*.
  441. 1.12
  442. 1WP.1wp_print F
  443. 1.12
  444. The F in the copy command makes it over-write the existing default
  445. driver.
  446. 1.12
  447. •   Paging problems. You can now get a version of First Word Plus that
  448. obeys the command in the printer driver to stop at the end of a page to
  449. allow you to change the paper. Brian Carroll writesÉ “I returned my disc
  450. to Acorn and had it back by return of post with a clear and helpful
  451. letter. It seems that Acorn are at last getting the message about
  452. customer support. There are only two modified files: $.resources.1WP.1WP
  453. and $.resources.1WP. 1ML, so for anyone who has done some work to
  454. configure their working master disc it would be simpler just to copy
  455. these two files across than to start again from scratch. The bug-fix
  456. works OK, so the printer drivers that I sent for Canon PW-1080A (program
  457. disc number 10) will work properly.”
  458. 1.12
  459. •   LQ1050 − You can add double height to the printer driver merely by
  460. using Search and Replace, changing 57 for 77 (double width for double
  461. height). It works fine − the only thing to remember is to set the line
  462. spacing to 2 in the ruler when choosing expanded pitch.
  463. 1.12
  464. •   Large documents. Beware when you are printing long documents (30
  465. pages+) as FWP can get a bit confused and print the wrong pages.
  466.